package com.example.deepschool.Model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class Discussion {
	
	@Schema(description = "讨论ID")
    private Long id;
	
	@Schema(description = "发起用户的ID")
	@NotBlank
    private Long fromUserId;
	
	@Schema(description = "回复的讨论ID，如果此讨论是对另一个讨论的回复")
	private Long toDiscussionId;
	
	@Schema(description = "关联的课程ID")
	@NotBlank
	private Integer courseId;
	
	@Schema(description = "讨论内容")
    @NotBlank
    private String content;
	
	@Schema(description = "获得的点赞数")
	private Integer likeCount;
	
	@Schema(description = "发布时间")
    private java.sql.Timestamp postTime;
	
	@Schema(description = "发起用户的昵称")
	private String senderNickname;
	
	@Schema(description = "发起用户的头像URL")
	private String senderAvatarUrl;
	
	@Schema(description = "被回复用户的ID，如果这条消息是对另一用户回复的话")
	private Long repliedFromUserId;
	
	@Schema(description = "被回复用户的昵称，如果这条消息是对另一用户回复的话")
	private String repliedSenderNickname;
}
